﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkLogEdit.aspx.cs" Inherits="ZHDJ.PersonalCenter.Module.HardParty.WorkLogEdit" %>


<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Items>
                <f:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
                    BodyPadding="10px" Title="SimpleForm">
                    <Items>
                        <f:TextBox ID="txtTitle" runat="server" Label="标题" LabelAlign="right" Required="true" ShowRedStar="true" RequiredMessage="请填写标题">
                        </f:TextBox>
      
                     
                        <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                            <script type="text/plain" id="editor"></script>
                        </f:ContentPanel>
                        <f:HiddenField ID="hdImageId" runat="server"></f:HiddenField>
                    </Items>
                </f:SimpleForm>
            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
    </form>
</body>
</html>
<script src="../../../../Resource/ueditor/ueditor.config.js"></script>
<script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>

<script>
    var editor;
    var editorContent = '<%=EditorContent%>';
    var containerClientID = '<%= ContentPanel1.ClientID %>';
    F.ready(function () {


        editor = UE.getEditor("editor", {
            initialFrameWidth: '100%',
            initialFrameHeight: '300',
            enableAutoSave: false,
            saveInterval: 1000000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            onready: function () {
                // 重新布局外部容器
                F(containerClientID).updateLayout();
            }
        });

        editor.ready(function () {
            if (editorContent) {
                editor.setContent(editorContent);
            }
        });
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }

    // 更新编辑器内容
    //function updateEditor(content) {
    //    if (editor && editor.isReady) {
    //        editor.setContent(content);
    //    }
    //}
</script>